home *** CD-ROM | disk | FTP | other *** search
/ MacUser Mac Bin 40 / MACUSER-MACBIN40A-1997-03.ISO.7z / MACUSER-MACBIN40A-1997-03.ISO / DEMO / SecretsJ DEMO / WATER.DIR / 00016_Script_16 < prev    next >
Text File  |  1996-12-02  |  5KB  |  186 lines

  1. on mousedown
  2.   global loop,doors,eggwater
  3.   
  4.   repeat with i = 17 to 20
  5.     puppetsprite i,true
  6.   end repeat
  7.   
  8.   set loop = 0
  9.   set win = false
  10.   set bottom = false
  11.   docur(6)
  12.   set b1 = ball1()
  13.   set b2 = ball2()
  14.   set b3 = ball3()
  15.   repeat while the mousedown AND ROLLOVER(41)
  16.     set mv = the mousev
  17.     if mv > 281 and mv < 353 then
  18.       set bottom = false
  19.       --set lh = integer(((mv-281)*13)/72)
  20.       --set mh = integer(((mv-281)*6)/72)
  21.       
  22.       set lh = ((mv-281)*13)/72
  23.       set mh = ((mv-281)*6)/72
  24.       set the loc of sprite 17 = point(241-lh,mv)
  25.       --set the loch of sprite 17 = 241 - lh
  26.       
  27.       if mv >= b1 then
  28.         set the locv of sprite 18 = b1
  29.       else
  30.         set the loc of sprite 18 = point(279-mh,mv)
  31.         --set the loch of sprite 18 = 279 - mh
  32.       end if
  33.       
  34.       if mv >= b2 then
  35.         set the locv of sprite 19 = b2
  36.       else
  37.         set the locv of sprite 19 = mv
  38.       end if
  39.       
  40.       if mv >= b3 then
  41.         set the locv of sprite 20 = b3
  42.       else
  43.         set the loc of sprite 20 = point(350+mh,mv)
  44.         --set the loch of sprite 20 = 350 + mh
  45.       end if
  46.     else if mv <= 281 then
  47.       set bottom = false
  48.       set the locv of sprite 17 = 281
  49.       set the locv of sprite 18 = 281
  50.       set the locv of sprite 19 = 281
  51.       set the locv of sprite 20 = 281
  52.     else if mv >= 353 then
  53.       set bottom = true
  54.       set the locv of sprite 17 = 353
  55.       
  56.       if mv >= b1 then
  57.         set the locv of sprite 18 = b1
  58.       else
  59.         set the locv of sprite 18 = 353
  60.         set the loch of sprite 18 = 279 - mh
  61.       end if
  62.       
  63.       if mv >= b2 then
  64.         set the locv of sprite 19 = b2
  65.       else
  66.         set the locv of sprite 19 = 353
  67.       end if
  68.       
  69.       if mv >= b3 then
  70.         set the locv of sprite 20 = b3
  71.       else
  72.         set the locv of sprite 20 = 353
  73.         set the loch of sprite 20 = 350 + mh
  74.       end if
  75.     end if
  76.     updatestage
  77.   end repeat
  78.   
  79.   if b1 = 297 and b2 = 281 and b3 = 325 then
  80.     set win = true
  81.   end if
  82.   
  83.   if bottom = true and eggwater = true and win = true then
  84.     if doors = false then
  85.       set doors = true 
  86.       set the visible of sprite 2 to true
  87.     else if doors = true then
  88.       set doors = false
  89.       set the visible of sprite 2 to false
  90.     end if
  91.     set loop = 0 
  92.     set the visible of sprite 21 = true
  93.     set the visible of sprite 22 = true
  94.     set the visible of sprite 23 = true
  95.     set the visible of sprite 24 = true
  96.     
  97.     go to "end"
  98.   else if win = false and bottom = true and eggwater = true then
  99.     set loop = 0
  100.     go to "water"
  101.   else if bottom = false then
  102.     repeat with i = 7 to 10
  103.       puppetsprite i,false
  104.     end repeat
  105.     
  106.     repeat with i = 17 to 20
  107.       puppetsprite i,false
  108.     end repeat
  109.     updatestage
  110.     go to "alter"
  111.   else
  112.     puppetsound 3,335
  113.     repeat with i = 7 to 10
  114.       puppetsprite i,false
  115.     end repeat
  116.     
  117.     repeat with i = 17 to 20
  118.       puppetsprite i,false
  119.     end repeat
  120.     updatestage
  121.     go to "alter"
  122.   end if
  123. end
  124.  
  125.  
  126. on ball1
  127.   set cn7 = the membernum of sprite 7
  128.   set cn9 = the membernum of sprite 9
  129.   set stop = 353
  130.   if cn7 = 176 then
  131.     set stop = 281
  132.   else if cn7 = 175 then
  133.     set stop = 286
  134.   else if cn7 = 174 then
  135.     set stop = 297
  136.   else if cn9 = 181 then
  137.     set stop = 317
  138.   else if cn9 = 180 then
  139.     set stop = 325
  140.   else if cn9 = 187 then
  141.     set stop = 340
  142.   end if
  143.   return stop
  144. end 
  145.  
  146. on ball2
  147.   set stop = 353
  148.   set cn7 = the membernum of sprite 7
  149.   set cn8 = the membernum of sprite 8
  150.   set cn9 = the membernum of sprite 9
  151.   set cn10 = the membernum of sprite 10
  152.   if cn7 = 178 or cn8 = 176 then
  153.     set stop = 281
  154.   else if cn7 = 171 or cn8 = 175 then
  155.     set stop = 286
  156.   else if cn7 = 172 or cn8 = 174 then
  157.     set stop = 297
  158.   else if cn9 = 183 or cn10 = 181 then
  159.     set stop = 317
  160.   else if cn9 = 184 or cn10 = 180 then
  161.     set stop = 325
  162.   else if cn9 = 185 or cn10 = 187 then
  163.     set stop = 340
  164.   end if
  165.   return stop
  166. end 
  167.  
  168. on ball3
  169.   set stop = 353
  170.   set cn8 = the membernum of sprite 8
  171.   set cn10 = the membernum of sprite 10
  172.   if cn8 = 178 then
  173.     set stop = 281
  174.   else if cn8 = 171 then
  175.     set stop = 286
  176.   else if cn8 = 172 then
  177.     set stop = 297
  178.   else if cn10 = 183 then
  179.     set stop = 317
  180.   else if cn10 = 184 then
  181.     set stop = 325
  182.   else if cn10 = 185 then
  183.     set stop = 340
  184.   end if
  185.   return stop
  186. end